package com.yuke.cloud.service.omc.service.impl;

import com.yuke.cloud.service.omc.dao.OdsAwardMapper;
import com.yuke.cloud.service.omc.dto.OdsAwardDto;
import com.yuke.cloud.service.omc.entity.OdsAward;
import com.yuke.cloud.service.omc.service.OdsAwardService;
import com.yuke.cloud.common.core.support.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by zn on 2020/10/16.
 */
@Service
@Transactional
public class OdsAwardServiceImpl extends BaseService<OdsAward> implements OdsAwardService {
    @Resource
    private OdsAwardMapper odsAwardMapper;

    @Override
    public int deleteAwardById(Long id){
        OdsAward odsAward = new OdsAward();
        odsAward.setAwardId(id);
        odsAward.setDeleteTag((byte)1);
        return odsAwardMapper.updateByPrimaryKeySelective(odsAward);
    }

    @Override
    public List<OdsAwardDto> getAwardList(){
        return odsAwardMapper.getAwardList();
    }
}
